package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.zzyl.nursing.domain.Reservation;
import com.zzyl.nursing.vo.ReservationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ReservationMapper extends BaseMapper<Reservation> {
    Integer selectCancelledCount(Long userId);

    Page<Reservation> selectReservationByPage(@Param("userId") Long userId,@Param("status") Integer status);

    List<ReservationVo> selectReservationByTime(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
}
